package ImageInterface.Homework;

import java.awt.GridLayout;
import javax.swing.JFrame;
import javax.swing.JButton;

public class Homework3 {
    public static void main(String[] args) {
        JFrame frame = new JFrame("网格分布管理器");
        frame.setLayout(new GridLayout(3, 2, 5, 5));
        for (int i = 1; i <= 6; i++) {
            frame.add(new JButton("按钮" + i));
        }
        frame.setSize(300, 250);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
    }
}